package com.test;

import java.util.Arrays;
import java.util.Scanner;

/***
 * @ClassName: LeetCode
 * @Description:
 * @Auther: 送一一块二向箔
 * @Date: 16:10 2022/2/18
 * @version : V1.0
 */
public class LeetCode {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] s1 = s.split(",");
        int[] ints = new int[s1.length - 1];
        for (int i = 0; i < s1.length - 1; i++) {
            ints[i] = Integer.parseInt((String) s1[i]);
        }
        int i = Integer.parseInt((String) s1[s1.length - 1]);
        int[] ints1 = twoSum(ints, i);
        System.out.println(Arrays.toString(ints1));
        System.out.println(-1 < 3);
    }


    public static int[] twoSum(int[] nums, int target) {
        int[] ints = new int[2];
        for (int i = 0; i <= nums.length; i++) {
            for (int j = i + 1; j < nums.length; j++) {
                if (nums[i] + nums[j] == target) return new int[]{i, j};
            }
        }
        return ints;
    }

    public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
        ListNode result = new ListNode();
        ListNode temp = new ListNode();
        for (int i = 0; l1.next != null; l1 = l1.next, i++) {
            if (i == 0) {
                temp.val = result.val;
                temp.next = result.next;
                if (i == 0) {
                    result.next = new ListNode(l1.val);
                } else {
                    result.next = temp;
                }
            }
            result.val = l1.next.val;
        }

        return result;

    }


}
